package th.go.drr.gps.repository;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import th.go.drr.gps.dao.h.UserDAOHandler;
import th.go.drr.gps.domain.Usr;
import th.go.drr.gps.repository.h.AuthenticationHandler;



public class Authentication implements AuthenticationHandler {

	@Autowired
	@Qualifier("usrDAO")
	private UserDAOHandler usrDAO; 
	
	@Override
	public Usr findByUserName(String username) {		
		return usrDAO.findByName(username);
	}

	public UserDAOHandler getUsrDAO() {
		return usrDAO;
	}

	public void setUsrDAO(UserDAOHandler usrDAO) {
		this.usrDAO = usrDAO;
	}	
}
